<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>人才招聘-北京华腾橡塑乳胶制品有限公司</title>
    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="css/all.min.css">
    <link rel="stylesheet" href="css/style.css">
</head>

<body>
    <div class="flex-container joinus">
        #include('inc/top.html')
        <div class="container-fluid">
            <div class="intobg"></div>
        </div>

        <div class="container text-center pb-2">
            <h2 class="product-title">人才招聘</h2>
            <p class="product-subtitle">Recruitment</p>
        </div>
        <div class="container-fluid eq-bg">
           
            <div id="app">
                
           
            <div class="container pt-4 mb-5">
                
                <div class="row joblist" v-for="entry in list">
                    <div class="col-3">
                        <span class="img">
                            <img v-bind:src="entry.lcon_url">
                        </span>
                        <p class="title">{{ entry.position_type }}</p>
                        <p class="content">
                            职位类型：{{ entry.position_type }}<br>
                            发布时间：{{ entry.release_time }}<br>
                            有效日期：{{ entry.effective_date }}<br>
                            基本要求：{{ entry.basic_requirements }}<br>
                            工作地点：{{ entry.working_place }}
                        </p>
                    </div>
                    <div class="col-9">
                        <span class="title">职位描述：</span>
                        <p>{{ entry.job_description }}</p>
                        <p>
                        报名方式：{{ entry.registration_method }}<br>
                        工作地址：{{ entry.work_address }}
                        </p>
                    </div>
                </div>
                <div style="margin: 6rem auto 1rem;width: 90%;text-align: center;">
                    <a href="javascript:next()" class="btn btn-outline-primary">加载更多<i class="fas fa-plus-square"></i></a>
                </div>
            </div>
            
            </div>
            
        </div>
    </div>
    <!--bottom-->
    #include('inc/footer.html')

    <script src="js/jquery-3.3.1.min.js"></script>
    <script src="js/vue.min.js"></script>
    <script src="js/popper.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script>
        
        var page = 1;
        var pageMax;
        
        function next(){
            page++;
            getdata(page);
        }
        
        var app = new Vue({
          el: '#app',
          data: {
              list:[]
          }
        });
        
        
        
        function getdata(p){
            var url = "/recruit2/getJson";
            pm = {
                page:p,
                language:'ch', 
                pageSize:6
                
            }
            
            
            if(pageMax!="" && page > pageMax){
                alert("没有更多数据了!")
                return;
            }
            
            $.post(url,pm,function(e){
                console.log(e);
                pageMax = e.totalRow;
                
                for(var i in e.list){
                    app.list.push(e.list[i]);
                }
                
            });
        }
        
        getdata(1);
    </script>
</body>

</html>